﻿<UserControl x:Class="LiSAClient.WpfClient.View.Projects.NewProject_Step4"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" MinWidth="800" MinHeight="700">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width ="*"/>
            <ColumnDefinition Width="300"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="20"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <!--Caption-->
        <Label Grid.Column="0" Grid.Row="0" Content="Search Keywords" Style="{StaticResource PageCaption}"/>

        <!--Dispaly added criteria-->

        <ListBox Grid.Row="1" Name="SearchKeywordsDataGrid" ItemsSource="{Binding Project.SearchKeywords}"
                       IsSynchronizedWithCurrentItem="True" SelectionMode="Single">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding}" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <!--Allow new criteria-->
        <Grid Grid.Row="1" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>


            <!--SearchString-->
            <Label Grid.Column="0" Grid.Row="0" Content="Search Keyword" Style="{StaticResource InformationCaption}"/>
            <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding NewSearchKeyword, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource EditableTextBox}" TabIndex="0" />
            
            <!--SubmitButton-->
            <Button Grid.Row="1" Grid.Column="1" Name="ButtonNewSearchString" Style="{StaticResource LoginBoxButtonStyle}" Command="{Binding AddNewSearchKeyword}" TabIndex="2" Content="Add Keyword" IsDefault="True" Width="120"/>
        </Grid>

        <!--Display navigation buttons-->
        <Button Grid.Row="3" Grid.Column="0" Name="ButtonPrevious" Style="{StaticResource LoginBoxButtonStyle}" Command="{Binding PreviousStep}" TabIndex="5" Content="Previous" HorizontalAlignment="Left"/>

        <Button Grid.Row="3" Grid.Column="1" Name="ButtonNext" Style="{StaticResource LoginBoxButtonStyle}" Command="{Binding NextStep}" TabIndex="4" Content="Next" />

    </Grid>
</UserControl>
